<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
		<base href="<%=basePath%>" />
		<title>Insert title here</title>
		<link href="css/validate.css" rel="stylesheet" type="text/css" />
		<link href="css/common.css" rel="stylesheet" type="text/css" />
		<link href="css/dtree.css" rel="stylesheet" type="text/css" />
		<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
		<script src="js/css.js" type="text/javascript"></script>
		<script src="js/common.js" type="text/javascript"></script>
		<script src="js/validator.js" type="text/javascript"></script>
		<script src="js/foldernav.js" type="text/javascript"></script>
		<script src="js/dtree.js" type="text/javascript"></script>

	</head>
	<body>
		<div id="man_zone">
		<s:form name="form" id="form" action="user/roleAddAction.action" theme="simple">
		<div class="navbar">
			账户管理 > 角色管理  > 添加角色
		</div>			
		<div class="toolbar">
			<input type="submit" value="保存" class="button_60" onMouseOver="this.className='button_60_over'" onMouseOut="this.className='button_60'"/>
			<input type="button" value="返回" onclick="javascript:history.back(-1)" class="button_60" onMouseOver="this.className='button_60_over'" onMouseOut="this.className='button_60'"/>
				
		</div>
		
		<div class="main_content" >
		<table width="99%" border="0" align="center" cellpadding="3" 
				cellspacing="1" align="center">

			<tr>
				<td width="15%" class="left_title_1">
					角色名称:
				</td>
				<td width="85%">
					&nbsp;&nbsp;&nbsp;
					<s:textfield name="role.rolename" require="true" datatype="limit|ajax" url="user/roleAddAction!checkRole.action" min="1"
					max="20" msg='字符长度必须为1到20位。' /><span style="color:red">*</span>
				</td>
			</tr>
			   				
			
			<tr>
				<td class="left_title_2">
					描述:
				</td>
				<td>
					&nbsp;&nbsp;&nbsp;
						 <s:textfield name="role.description" size="100" require="false" datatype="limit" min="1"
					max="60" msg='字符长度必须为1到60位。' />
				</td>
			</tr>

			<tr>
				<td class="left_title_2">
					
				</td>
				<td>
				
					<!--开始-->
					<div class="dtree">
						<script type="text/javascript">
            				d = new dTree('d');
	           				<%
	            				try{
	            				    List powerTreeList = (List)request.getAttribute("powerTreeList");
	            				    for(int i=0;i<powerTreeList.size();i++)
	            				    {
	            				        out.println(powerTreeList.get(i));
	            				    }
	            				}catch(Exception ex)
	            				{
	            				    ex.printStackTrace();
	            				}
	            			%>
				          //  obs=null;
				          //  power=null;
				          //  powerList=null;
				            document.write(d);
						</script>
					</div>
					
					<!--结束-->
				</td>
			</tr>

		
	</table>
	</div>
	</s:form>
	</div>
	</body>
	<script language="javascript">
		$().ready(function() {
			$('form').checkForm(1);
		});

	</script>
</html>